var webpack = require('webpack');
var path = require('path');

module.exports ={
    context: __dirname + '/src',
    entry:"./js/root.js",
    module: {
        rules:[
            {
                test:/\.js?$/,
                exclude:/(node_modules)/,
                loader: "babel-loader",
                query: {
                    presets:['react','es2015'],
                    plugins: ['react-html-attrs']
                }
            },
            {
                test: /\.css$/,
                loader: 'style-loader!css-loader?modules'
            }
        ]
    },

    output: {
        path: __dirname + "/src/",
        filename: "bundle.js",
    },

    mode: 'development' // 设置mode

};